Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMCL-1634: decollider would sometimes cause camera to slip inside cracks between adjacent colliders #1033

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

glabute
Copy link
Collaborator

@glabute glabute commented Jan 9, 2025

Purpose of this PR

CMCL-1634: decollider would sometimes cause camera to slip inside cracks between adjacent colliders

This is because the collider detection algorithm was inadequate. Algorithm was reworked to be more robust around colliders made up of multiple adjacent colliders. Camera will only go into the crack if the crack is wider than the camera radius specified in the Decollider.

Bonus: smoothing logic was also simplified and corrected, fixing an intermittent bug that caused the camera to sometimes snap out of its smoothed position, bypassing damping. That bug was unreported.

Testing status

  • Added an automated test
  • Passed all automated tests
  • Manually tested

Documentation status

  • Updated CHANGELOG
  • Updated README (if applicable)
  • Commented all public classes, properties, and methods
  • Updated user documentation

Technical risk

low

Comments to reviewers

Please see test scene in the Jira ticket.

@codecov-commenter
Copy link

codecov-commenter commented Jan 9, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 50 lines in your changes missing coverage. Please review.

Project coverage is 27.21%. Comparing base (ba4cc2b) to head (c6b10f0).
Report is 78 commits behind head on main.

Files with missing lines Patch % Lines
...achine/Runtime/Behaviours/CinemachineDecollider.cs 0.00% 50 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1033      +/-   ##
==========================================
+ Coverage   26.97%   27.21%   +0.24%     
==========================================
  Files         254      254              
  Lines       28418    28485      +67     
==========================================
+ Hits         7665     7753      +88     
+ Misses      20753    20732      -21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@sebastienduverne sebastienduverne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor things in Changelog.

com.unity.cinemachine/CHANGELOG.md Show resolved Hide resolved
com.unity.cinemachine/CHANGELOG.md Outdated Show resolved Hide resolved
style

Co-authored-by: Sébastien Duverne <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants